package pikes.peak;

import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

import org.junit.Assert;
import org.junit.Test;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;

import pikes.peak.CookieLocaleURIParameter;

public class CookieLocaleURIParameterTestCase {

	@Test
	public void simple() throws Exception {
		CookieLocaleURIParameter ctu = new CookieLocaleURIParameter(Locale.US);

		Map<CharSequence, CharSequence> parameters = new HashMap<CharSequence, CharSequence>();

		ctu.build(parameters);

		Assert.assertEquals("en_US", parameters.get(LocaleChangeInterceptor.DEFAULT_PARAM_NAME));
	}
}
